package com.afei.bottomtabbar.base;

import android.support.v7.widget.Toolbar;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.FrameLayout;

import com.afei.bottomtabbar.R;

import butterknife.ButterKnife;
import im.quar.autolayout.AutoLayoutActivity;

/**
 * @Author： linhuaming
 * @ Date ： 2019/01/09 19:19:19
 * @Email ： linhuaming0603@outlook.com
 */
public abstract class HoleCompatActivity extends AutoLayoutActivity {

    protected Toolbar mToolbar;

    @Override
    public void setContentView(int layoutResID) {
        final View holeCompatLayout = LayoutInflater.from(this).inflate(R.layout.activity_hole_compat, null);
        super.setContentView(holeCompatLayout);
        mToolbar = findViewById(R.id.toolbar);
        setSupportActionBar(mToolbar);
        final FrameLayout container = findViewById(R.id.hole_compat_container);
        LayoutInflater.from(this).inflate(layoutResID, container, true);
        ButterKnife.bind(this);
    }
}
